package com.csjy.migration.hnnd;

import com.fasterxml.uuid.EthernetAddress;
import com.fasterxml.uuid.Generators;
import com.fasterxml.uuid.impl.TimeBasedGenerator;

public class StrongUuidGenerator {
  protected static TimeBasedGenerator timeBasedGenerator;

  public StrongUuidGenerator() {
    this.ensureGeneratorInitialized();
  }



  protected void ensureGeneratorInitialized() {
    if (timeBasedGenerator == null) {
      Class var1 = StrongUuidGenerator.class;
      synchronized(StrongUuidGenerator.class) {
        if (timeBasedGenerator == null) {
          timeBasedGenerator = Generators.timeBasedGenerator(EthernetAddress.fromInterface());
        }
      }
    }

  }

  public String getNextId() {
    return timeBasedGenerator.generate().toString().replace("-","");
  }
}

